

#include "config.h"
#include "entry.h"
#include "spiflash.h"

 #ifndef __SPI_FLASH__C
 #define __SPI_FLASH__C 


void spiFlashWrite(u8 _xdata *spidata,u32 xdata   address,u16 xdata  len)
{
    RW_ADDR xdata rwaddr ;

    disable_int();
    rwaddr.buf = spidata ;
    rwaddr.addr = address ;
    rwaddr.len = len ;
    bspspiFlashWrite(&rwaddr );
    enable_int();
}


void spiFlashRead(u8  _xdata *buf,u32    address,u16   len)
{
    RW_ADDR xdata rwaddr ;

    disable_int();
    rwaddr.buf = buf ;
    rwaddr.addr = address ;
    rwaddr.len = len ;
    bspspiFlashRead(&rwaddr) ;
    enable_int();
}

#endif


